﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Composite.Presentation.Commands;
using Acando.Dynamics.CRM.Silverlight.Library.Helper;

namespace RiaCrm.IsolationStorage
{
    public class IsolationStorageViewModel
    {
        public ICommand IncreaseIsoCommand { get; private set; }
        

        public IsolationStorageViewModel()
        {
            
            this.IncreaseIsoCommand = new DelegateCommand<String>(OnIncreaseIsoStorage);
        }

        private void OnIncreaseIsoStorage( String dummy )
        {
            long increasTo = (long)(IsolatedStoreHelper.GetCurrentSiteStoreSpace()*1.4);

            IsolatedStoreHelper.AskUserToIncreaseQuota(increasTo);
        }
    }
}
